20 PRINT SPC(29);:PRINT INVERSE(1);" A D D R E S S B O O K "
21 GOSUB 11000
22 ON ERROR GOTO 10000
25 OPEN "R",#3,"ADDRESS" ,72
26 FIELD #3,15 AS FIRST$,15 AS LAST$,30 AS ADDRESS$,12 AS PHONE$
27 RGET #3,1
28 NUMBER=CVI(FIRST$)
29 ON ERROR GOTO 0
30 FOR X=1 TO 6:READ MENU$(X):NEXT X
35 SCNCLR
36 CHO=0
40 DATA " FIND "," PRINT LIST "," ADD "," DELETE "," CHANGE "," QUIT "
45 PRINT AT (20,3);"MAKE SURE YOU QUIT OR THE FILE WON'T BE CLOSED"
46 PRINT AT (20,4);" ----"
50 PRINT AT (35,6);MENU$(1):PRINT AT (35,8);MENU$(2):PRINT AT(35, 10);MENU$(3):PRINT AT (35,12);MENU$(4):PRINT AT (35,14);MENU$(5):PRINT AT (35,16);MENU$(6)
60 PENA 3:BOX(200,35;260,48),1
61 PENA 4:BOX(200,51;260,64),1
62 PENA 5:BOX(200,67;260,80),1
63 PENA 6:BOX(200,83;260,96),1
64 PENA 7:BOX(200,99;260,112),1
65 PENA 9:BOX(200,115;260,128),1
70 ASK MOUSE X%,Y%,B%
72 IF X%>=200 AND X%<=260 AND Y%>=35 AND Y%<=48 AND B%=4 THEN COL=1:GOTO 200
73 IF X%>=200 AND X%<=260 AND Y%>=51 AND Y%<=64 AND B%=4 THEN COL=2:GOTO 200
74 IF X%>=200 AND X%<=260 AND Y%>=67 AND Y%<=80 AND B%=4 THEN COL=3:GOTO 200
75 IF X%>=200 AND X%<=260 AND Y%>=83 AND Y%<=96 AND B%=4 THEN COL =4:GOTO 200
76 IF X%>=200 AND X%<=260 AND Y%>=99 AND Y%<=112 AND B%=4 THEN COL=5:GOTO 200
77 IF X%>=200 AND X%<=260 AND Y%>= 115 AND Y%<=128 AND B%=4 THEN COL =6 :GOTO 200
80 GOTO 70
200 REM **************************************
210 REM * MAKE YOUR CHOICE *
220 REM **************************************
230 ON COL GOTO 1000,2000,3000,4000,5000,6000
240 GOTO 35
1000 REM ******************************************
1010 REM * FIND *
1020 REM ******************************************
1021 CHO=0
1030 WINDOW #1,320,10,640,100,"FIND IT"
1040 CMD 1
1045 PENA 1:BOX(30,0;65,13),1
1046 PENA 2:BOX(30,16;65,29),1
1047 PENA 3:BOX(30,32;65,44),1
1048 PENA 4:BOX(30,47;65,60),1
1049 PENA 5:BOX(30,63;65,76),1
1050 PRINT AT(10,1);" FIRST NAME"
1060 PRINT AT(10,3);" LAST NAME"
1070 PRINT AT(10,5);" ADDRESS "
1080 PRINT AT(10,7);" PHONE NUMBER"
1090 PRINT AT(10,9);" RETURN TO MAIN MENU"
1100 REM
1110 ASK MOUSE X%,Y%,B%
1111 IF X% >=30 AND X%<=65 AND Y%>=0 AND Y%<=13 AND B%=4 THEN CHO=1
1112 IF X%>=30 AND X%<=65 AND Y%>=16 AND Y%<=29 AND B%=4 THEN CHO=2
1113 IF X%>=30 AND X%<=65 AND Y%>=32 AND Y%<=44 AND B%=4 THEN CHO=3
1114 IF X%>=30 AND X%<=65 AND Y%>=47 AND Y%<=60 AND B%=4 THEN CHO=4
1115 IF X%>=30 AND X%<=65 AND Y%>=63 AND Y%<=76 AND B%=4 THEN CHO=5
1120 IF CHO<1 OR CHO>5 THEN 1110
1140 ON CHO GOTO 1200,1300,1400,1500,1600
1150 GOTO 1110
1200 REM **** FIRST NAME
1201 START=1
1210 CLOSE 1:CMD 0
1220 SCNCLR
1230 INPUT"FIRST NAME TO SEARCH FOR";FIR$
1240 FOR SEARCH=START TO NUMBER
1250 RGET #3,SEARCH
1260 IF LEFT$(FIRST$,(LEN(FIR$))) =FIR$ THEN FOUND=SEARCH:FOUNDFLAG=1:GOTO 1273
1270 NEXT SEARCH
1271 IF ONCE=0 THEN 1275 ELSE 1294
1273 IF FOUNDFLAG=1 THEN FOUNDFLAG=0:ONCE=1:GOTO 1280